#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable : 4996)
#pragma warning(disable : 6031)

#include <math.h>
#include <iostream>

using namespace std;

int main()
{
	double left = 1, right = 2;
	double mid = (left + right) / 2;

	for(int i = 1 ; i <= 19 ; i++)
	{
		if (mid * mid > 2)
		{
			right = mid;
		}
		else
		{
			left = mid;
		}
		cout << '[' << i << ']' << "->" << mid << endl;
		mid = (left + right) / 2;
	}

	cout << "[20]" << "->" << mid << endl;

	return 0;
}